package cn.xuguowen.user.designPatten.chain_of_responsibility.article.common;

/**
 * ClassName: BaseArticleFilter
 * Package: cn.xuguowen.user.designPatten.chain_of_responsibility.article.common
 * Description: 抽象类，抽取出公用的代码
 *
 * @Author 徐国文
 * @Create 2023/6/3 8:55
 * @Version 1.0
 */
public abstract class BaseArticleFilter implements ArticleFilter{

    public abstract boolean doFilter(ArticleContext articleContext);

    protected final void filter(ArticleContext articleContext) {
        // 过滤
        doFilter(articleContext);
        // 各种操作
        // 发送通知
        sendMsg();
    }

    protected void sendMsg() {
        System.out.println("发送通知！");
    }
}
